package com.democode.controller;
import org.example.ExecuteService;
import org.example.cicdi.service.impl.third.StarterCodeServiceExtSecond;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/welcome")
public class DemoController {
//    @Autowired
//    private org.jeecg.code.CodeExecuteService executeService;
//    @Autowired
//    private StartCodeServiceExtSecond st;
//    @Autowired
//    private ExecuteService executeService;
//    @Autowired
//    private StarterCodeServiceExtSecond st;
//    @Autowired
//    private ExecuteService executeService;
    @Autowired
    private StarterCodeServiceExtSecond st;
    //http://localhost:8011/welcome/hello
    @GetMapping("/hello")
    public String get() throws Exception{
        //return  executeService.execute();
        SqlSessionFactoryBean sqlSessionFactoryBean ;
//        String result=executeService.execute();
//        result=result+String.valueOf(executeService.executecal());
        st.process();
        return "result";

    }
    @GetMapping("/w")
    public String w() throws Exception{
        //return  executeService.execute();

        return "helloresult";

    }
}
